<style>
    .yen{border:none;height:0.75rem;width:0.75rem;display: inline-block;background: #ff4753;color:#fff;font-size:0.4rem;line-height: 0.8rem;text-align: center;
        font-style: normal;border-radius: 0.75rem;-webkit-border-radius: 0.75rem;}
    .order-create-page .fui-list.goods-item .fui-list-inner{
        height: 3.5rem;
        align-self: center;
    }
    .order-create-page .fui-list.goods-item .fui-list-angle{
        height: 3.5rem;
        align-self: center;
    }
    .order-create-page .fui-list-inner .subtitle{
        display: block;
    }
    .fui-header a.back2:before {
        content: " ";
        display: inline-block;
        -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        transform: rotate(45deg);
        height: 0.5rem;
        width: 0.5rem;
        border-width: 0 0 2px 2px;
        border-color: #666;
        border-style: solid;
        position: relative;
        top:0;
    }
.fui-btn-c {
    height: auto;
    margin: 0;
    padding: 0.4rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
	justify-content:center;
    align-items: center;
    position: relative;
}

.fui-btn-c .icon {
	font-size:1rem;
	padding-right:0.3rem;
	text-align:right;
}

.fui-btn-c .info {
	text-align:left;
    padding-right: 0.2rem;
    font-size: 0.75rem;
}

.fui-btn-c .info p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.jylabel-red-0.active::after{content:" ";width:23px;height:24px;background:url(../core/resource/images/promotion-bg.png) 0 -159px no-repeat;position:absolute;float:right;right:-1px;bottom:-1px;text-align:center;background-color:#fce9e9;}

</style>
<div class='fui-page order-create-page'>
    <div class='fui-content'>
	<!--校区选择-->
    <div>
		<div ng-if="pagedata.store.id>0" class="fui-list-group"  id="carrierInfo" style="margin: 0 0 0.5rem">
					<a class="fui-list" href="javascript:;" onclick="$('#showstores').modal();">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="text bold">
								<span style="overflow: hidden;display: inline-block;">报名校区：</span>
								<span class='realname'>{{pagedata.store.title}}</span>
								
							</div>
							<div class="text address">地址：<span style="color:red">{{pagedata.store.area_title}}</span>({{pagedata.store.address}})</div>

						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
		</div>
        <div class="fui-cell-group sm">
               
        </div>
	</div>
	<div class="fui-cell-group"  style="margin-top:0">
		<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">报名详情</div>
		<div class="fui-cell">
				<div class="fui-cell-text">
					<div class="bold">{{pagedata.lesson.title}}</div>
					<div class="subtitle">上课时间：{{pagedata.lesson.onday}}</div>
				</div>
				<div class="fui-cell-remark noremark">
					<span ng-if="pagedata.lesson.price>0">￥ {{pagedata.lesson.price}} <span class="subtitle" style="margin-left:0.2rem">{{pagedata.post.ifee ? '试听':'一阶段'}}</span></span>
				</div>
		</div>
		<div class="fui-cell">
				<div class="fui-cell-info">
					<span class="r-f bold" style="color:#000;">报名小计：
						课程1个，<span ng-if="pagedata.lesson.price>0" class="price red">￥{{price(pagedata.lesson.price) || '0.00'}}</span>
					</span>
				</div>
		</div>
	</div>
	<div class="fui-cell-group"  style="margin-top:0">
		<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">报名学员</div>
		 <div class="fui-cell">
                    <div class="fui-cell-label">学员姓名</div>
                    <div class="fui-cell-info c000"><input type="text" placeholder="请输入学员姓名" class="fui-input" ng-model="pagedata.post.name"/></div>
         </div>
          <div class="fui-cell">
                    <div class="fui-cell-label">联系电话</div>
                    <div class="fui-cell-info c000"><input type="tel" placeholder="请输入联系电话"  class="fui-input" ng-model="pagedata.post.mobile"/></div>
          </div>
	</div>
	<div class="fui-cell-group">
		<div class="fui-cell" onclick="$('#showremark').modal();">
			<div class="fui-cell-label" style="width:100px">报名留言</div>
			<div class="fui-cell-text bold r"><span ng-model="pagedata.post.remark" style="color:red">选填</span>({{pagedata.post.remark ? pagedata.post.remark :'50字以内!'}})</div>
			<div class="fui-cell-remark" ></div>
		</div>
	</div>
<div id="showremark"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">留言</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.remark"></textarea>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.lesson.price>0" class="fui-navbar order-create-checkout">
    <a href="javascript:;" class="nav-item total" style="text-align:left;padding-left:10px">
		<span class="text-danger bigprice">&yen; 
			<span  class="totalprice">{{price(pagedata.lesson.price) || '0.00'}}</span>
		</span>
    </a>
	<a class="nav-item"></a>
    <a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-if="!pagedata.order_id" ng-click="pagedata.pay_submit(pagedata.post,'post','/order//fromcreate=1')"  >立即支付</a>
	<a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-if="pagedata.order_id" ng-click="access_json('/order/detail/id='+pagedata.order_id+'&fromcreate=1')" >查看订单</a>
</div>
<div ng-if="pagedata.lesson.price==0" class="fui-navbar order-create-checkout">
    <a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="post(pagedata.post,'/create/post')">立即报名</a>
</div>
<div id="showstoreitem"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">{{pagedata.storeitem.title}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">地址：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.pcd.province}} {{pagedata.storeitem.pcd.city}} {{pagedata.storeitem.pcd.district}} {{pagedata.storeitem.pcd.street}} {{pagedata.storeitem.address}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系人：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.realname}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系电话：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.mobile}}</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">关闭</a>
			</div>
		</div>
	</div>
</div>
<div id="showstores"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom" style="padding-top:0.5rem">
			<i aria-hidden="true" data-dismiss="modal" class="closebtn icon icon-cuowu" style="top:0;right:0.1rem;color:#999;font-size:0.8rem"></i>
			<div class="fixed-title">
							 <span class="befirst spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
							 </span> 
							 <span class="title-text">选择校区</span> 
							 <span class="spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
							 </span>
			</div>
			<div class="fui-list-group merchgroup" style="margin:0 0.8rem;border-radius:0.5rem;">
				<div class="fui-list" ng-repeat="item in pagedata.store_list">
						<a class="fui-list-media storelogo" href="javascript:;" ng-click="pagedata.stores(item);">
							<img class="round" ng-src="{{tomedia(item.logo) || '../core/resource/images/nopic.jpg'}}">
						</a>
						<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="pagedata.stores(item);">
							<div class="title" style="font-size:0.76rem">{{item.title}}</div>
							<div class="subtitle">
								<i class="icon icon-map" style="color:#4491F1;font-size:0.6rem"></i> <span style="color:#999">{{item.address || '该校区还未填写地址'}}</span>
							</div>
							<div class="subtitle" style="font-size:0.55rem">
								<div class="store-moneylimit">
								  <span>电话 <span style="color:#4491F1">{{item.mobile || '无'}}</span> </span> | 
								  <span> 上课模式<span style="color:#4491F1"> 课时</span></span>
								  <span class="store-distance">上课时间：{{item.week_days}}</span>
								</div>
							</div>
						</a>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 放弃付款-->
<div ng-if="pagedata.checkcancel" class="popup">
			<div class="popup-body">
			<div class="popup-center" style="border-radius:0.2rem;">
				<div class="fui-page-title" style="margin-top:1rem">确定要取消订单吗？</div>
				<div class="fui-page-subtitle" style="margin-top:0.1rem">喜欢的商品可能随时会被抢空哦</div>
				<div class="modal-footer" style="margin-top:2rem">
					<a ng-click="pagedata.checkcancel=false" class="mod-fail">取消</a>
					<a href="javascript:" ng-click="post({},'cancel','id='+pagedata.order.id);pagedata.checkcancel=false" class="mod-success" style="background:red">确定</a>
				</div>
			</div>
			</div>
</div>
<script language='javascript'>
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		scope.pagedata.order_id=result.order_id;
		scope.$evalAsync();
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message(res.message,'success','/order/detail/fromcreate=1&payid='+result.pay_id);
				}else{
					scope.message(res.message,'success','/order/detail/fromcreate=1&payid='+result.pay_id);
				}
			});
	});
}
scope.pagedata.showstoreitem=function(){
	$('#showstoreitem').modal();
}
scope.pagedata.stores=function(item){
	scope.pagedata.post.store_id = item.id;
	scope.pagedata.store=item
	$('#showstores').modal('hide');
}

</script>

</div>
<div ng-include="sys_html('common/_footer')"></div>